module game{
    export class RankView extends BaseEuiView{

        public group:eui.Group;
        public txt_pre:eui.Label;
        public txt_next:eui.Label;
        public txt_text:eui.Label;
        public btn_start:eui.Image;
        public btn_reset:eui.Image;
        public bg:eui.Rect;

        public txt_score:eui.Label;
        public constructor($m:BaseController,$parent:eui.Group){
            super($m,$parent);
            this.skinName = "resource/skin/Rank.exml";
        }

        /**
         *对面板进行显示初始化，用于子类继承
            *
            */
        public initUI():void{
            super.initUI();

            this.txt_pre.addEventListener(egret.TouchEvent.TOUCH_TAP,this.onClickHandler,this);
            this.txt_next.addEventListener(egret.TouchEvent.TOUCH_TAP,this.onClickHandler,this);
            this.btn_start.addEventListener(egret.TouchEvent.TOUCH_TAP,this.onClickHandler,this);
            this.btn_reset.addEventListener(egret.TouchEvent.TOUCH_TAP,this.onClickHandler,this);


            this.skin.width = egret.MainContext.instance.stage.stageWidth;
            this.skin.height = egret.MainContext.instance.stage.stageHeight;

            this.bg.width = this.skin.width;
            this.bg.height = this.skin.height;

        }

         
        public open(...param:any[]):void {


        }

        private onClickHandler(e:egret.TouchEvent){
            switch(e.target){
                case this.btn_start:
                    
                break;
                case this.btn_reset:
                    App.ViewManager.close(ViewConst.Rank);
                    App.ViewManager.open(ViewConst.Home);
                break;
                case this.txt_pre:
                break;
                case this.txt_next:
                break;
            }
        }
    }
}